import WelcomePage from "../components/WelcomePage.vue";
import PlaneTicket from "../components/PlaneTicket.vue";
import TrainTickets from "../components/TrainTickets.vue";
import BusTicket from "../components/BusTicket.vue";
import Home from "../components/Home.vue";
import FlightSearchResult from "../components/plane-components/FlightSearchResult.vue";
import SearchResult from "../components/welcome-page-components/SearchResult.vue";
import TrainInfo from "../components/home-components/TrainInfo.vue";
import PlaneInfo from "../components/home-components/PlaneInfo.vue";
import BusInfo from "../components/home-components/BusInfo.vue";
import BusSearchResult from "../components/bus-components/BusSearchResult.vue";
import TrainSearchResult from "../components/train-components/TrainSearchResult.vue";
import Login from "../components/login-components/LoginPage.vue"
import UserInfoPage from "../components/UserInfoPage.vue"

const routes = [
    {
        // 欢迎页
        path: '/',
        component: WelcomePage,
        children: [
            // 首页
            {
                path: 'home',
                component: Home,
                // 首页快速导航
                children: [
                    {
                        path: 'plane-info',
                        name: "PlaneInfo",
                        component: PlaneInfo
                    },
                    {
                        path: 'train-info',
                        name: "TrainInfo",
                        component: TrainInfo
                    },
                    {
                        path: 'bus-info',
                        name: "BusInfo",
                        component: BusInfo
                    }
                ]
            },
            // 航班购票页面
            {
                path: '/plane-ticket',
                component: PlaneTicket,
                children: [

                ]
            },
            // 机票搜索结果
            {
                path: 'flightSearchResult',
                name: 'FlightSearchResult',
                component: FlightSearchResult,
            },
            // 火车票购票页面
            {
                path: '/train-tickets',
                component: TrainTickets
            },
            // 汽车票购票页面
            {
                path: '/bus-ticket',
                component: BusTicket,

            },
            // 汽车票搜索结果
            {
                path: '/bus-search-result',
                name: 'busSearchResult',
                component: BusSearchResult
            },
            // 火车票搜索结果
            {
                path:'/train-search-result',
                name:'trainSearchResult',
                component: TrainSearchResult
            },
            // 全局搜所结果
            {
                path: '/searchResult',
                name: 'SearchResult',
                component: SearchResult
            }
        ]
    },
    {
      // 登录页
      path: '/login',
      component: Login,
    },
    {
      // 用户信息
      path: '/info',
      component: UserInfoPage
    },
]

export default routes